//
//  EJSUserInfoRequest.m
//  EnjoyShoppingStreet
//
//  Created by lifayu on 2017/12/29.
//  Copyright © 2017年 lifayu. All rights reserved.
//

#import "EJSUserInfoRequest.h"

@implementation EJSUserInfoRequest

- (NSString *)uri{
    return @"/api/user/getInfo";
}

- (Class)responseDataClass{
    return [EJSUserModel class];
}

- (void)asyncRequestWithsuccessHandler:(RequestCompletionHandler)succHandler failHandler:(RequestCompletionHandler)fail{
    [super asyncRequestWithsuccessHandler:^(BaseResponse *response) {
        EJSUserModel *userModel = response.data;
        [userModel save];
        succHandler(response);
        
    } failHandler:^(BaseResponse *response) {
        fail(response);
    }];
}

@end
